package zmm

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/zmm/model/entity"
)

type ZmmEmployeeListReq struct {
	g.Meta  `path:"/zmm_employee/list" tags:"员工管理" method:"get" summary:"员工列表" security:"bearer"`
	Name    string `p:"name"`
	Status  string `p:"status"`
	Contact string `p:"contact"`
	commonApi.PageReq
}
type ZmmEmployeeOpQueryListReq struct {
	g.Meta  `path:"/zmm_employee/op_query/list" tags:"员工管理" method:"get" summary:"员工下拉列表" security:"bearer"`
	OpQuery string `p:"op_query"`
}

type ZmmEmployeeListRes struct {
	g.Meta      `mime:"application/json"`
	ZmmEmployee []*entity.ZmmEmployee `json:"list"`
	commonApi.ListRes
}

type ZmmEmployeeEditReq struct {
	g.Meta  `path:"/zmm_employee/edit" tags:"员工管理" method:"post" summary:"员工修改" security:"bearer"`
	ID      uint64 `p:"id" v:"integer#ID必须为数字" summary:"ID" d:"0"`
	Name    string `p:"name" v:"required#请输入员工名称" d:""`
	Contact string `p:"contact" v:"required#请输入联系方式" d:""`
	Remark  string `p:"remark" d:""`
	Status  uint8  `p:"status" v:"required|integer|in:0,1#请选择状态|状态类型有误|状态格式有误" d:"1"`
}
type ZmmEmployeeEditRes struct {
	g.Meta `mime:"application/json"`
	ID     uint64 `json:"id"`
}

type ZmmEmployeeDelReq struct {
	g.Meta `path:"/zmm_employee/delete" tags:"员工管理" method:"delete" summary:"员工删除" security:"bearer"`
	ID     uint64 `p:"id" v:"required|integer#ID参数错误|ID必须为数字" summary:"ID" d:"0"`
}
type ZmmEmployeeDelRes struct{}
